@include("layout.header")
<div class="layui-body">
    <div class="user-login-header">
        <h2>
            修改操作页
        </h2>
    </div>
    <form class="layui-form" action="/index.php/admin/updateper">
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="hidden" name="id" value="{{$permission->id}}" required  lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">操作名称</label>
            <div class="layui-input-inline">
                <input type="text" name="name" value="{{$permission->name}}" required  lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">命名空间</label>
            <div class="layui-input-inline">
                <input type="text" name="namespace" value="{{$permission->namespace}}"  required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">控制器</label>
            <div class="layui-input-inline">
                <input type="text" name="controller" value="{{$permission->controller}}"  required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">方法</label>
            <div class="layui-input-inline">
                <input type="text" name="action" value="{{$permission->action}}"  required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-inline">
                <input type="text" name="description" value="{{$permission->description}}"  required lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 300px">父节点</label>
            <select class="form-control select2" name="parent_id">
                <option selected="selected">/</option>
                @foreach($parents as $parent)
                    @if($parent->id == $permission->parent_id)
                        <option value="{{$parent->id}}" selected>{{$parent->name}}</option>
                    @else
                        <option value="{{$parent->id}}">{{$parent->name}}</option>
                    @endif
                @endforeach
            </select>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>

@include("layout.footerper")
